<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	template="layout/template.xhtml">

	<ui:define name="body">

		<rich:panel>
			<f:facet name="header">
New Todo
</f:facet>
			<h:form>
				<fieldset><s:decorate id="namedecorate"
					template="/layout/edit.xhtml">
					<ui:define name="label">Name:</ui:define>
					<h:inputText value="#{todo.name}" size="100" required="true"
						reRender="namedecorate"></h:inputText>
				</s:decorate> <s:decorate id="leveldecorate" template="/layout/edit.xhtml">
					<ui:define name="label">Level:</ui:define>
					<h:selectOneMenu value="#{todo.level}">
				<s:selectItems value="#{levels}" var="level" label="#{level.label}" noSelectionLabel="Please select" />
				<s:convertEnum />
			</h:selectOneMenu>
				</s:decorate> <s:decorate id="contentdecorate" template="/layout/edit.xhtml">
					<ui:define name="label">Content:</ui:define>
					<h:inputTextarea value="#{todo.content}" cols="120" rows="30"></h:inputTextarea>
				</s:decorate></fieldset>
				<div class="buttonBox"><h:commandButton type="submit"
					value="Save" action="#{todoaction.save}" />&#160;<s:button
					id="close" value="Close" action="#{todoaction.close}" /> &#160;<s:button
					id="finish" value="Finish" action="#{todoaction.finish}" /> &#160;<s:button
					id="cancel" value="Cancel" action="#{todoaction.cancel}" /></div>
			</h:form>

		</rich:panel>
	</ui:define>

</ui:composition>
